<template>
	<view class="test">
		<input type="text" @input="onInput">
	</view>
</template>

<script lang="ts">
import { ref } from "vue"
	export default {
		setup(props, context){
			const val = ref('');
			return {
				val,
			}
		},
		emits:['update:modelValue'],
		model: {
			prop: 'modelValue',
			event: 'update:modelValue'
		},
		methods:{
			onInput(e){
				// console.log(this)
				console.log(this)
				this.$emit('update:modelValue',e.detail.value);
			}
		},
		watch:{
			'$attrs.modelValue'(newVal){
				// console.log('newVal',newVal)
			}
		}
	}
</script>

<style>
</style>